<template>
  <div class="conttent">
    <header>
      <div class="header-top">
        <span class="newspan">上海</span>
        <div>试一试:西贝筱面村</div>
      </div>
      <view class="uni-padding-wrap">
        <view class="page-section swiper">
          <view class="page-section-spacing">
            <swiper
              class="swiper"
              :indicator-dots="indicatorDots"
              :circular="true"
              :autoplay="autoplay"
              :interval="interval"
              :duration="duration"
            >
              <swiper-item v-for="(item, index) in list" :key="index">
                <view class="swiper-item uni-bg-red"
                  ><img :src="item.picUrl" alt=""
                /></view>
              </swiper-item>
            </swiper>
          </view>
        </view>
      </view>
      <div>
        <NearbyRetaurnt />
      </div>
      <!-- <img :src="item.picUrl" alt=""> -->
    </header>
  </div>
</template>

<script>
import NearbyRetaurnt from "../../components/nearbyRetaurnt";

import { Bananer, getFiltercontent } from "../../server";
export default {
  data() {
    return {
      title: "Hello",
      list: [],
      indicatorDots: true,
      autoplay: true,
      interval: 1000,
      duration: 500,
    };
  },
  onLoad() {
    //   轮播图的生命周期
    Bananer({
      cityId: 19,
      mwAuthToken:
        "uPCQvKl9RhX5r9SGP2noD0Ei0D3egOAN8IrKQ9lIY-BS0nZ8NKqZIMOel3oNkoUYqtPCSKhwebLrgjfpX-CQWJIcZYXmpdLdIF3rNSY-BJe8dSyjtMBhBHk20pqzLLrwWAX-Cq4yzX-ChX-Csk9vBdT1EflbSDPNZFGgxBc5VnC14kzL8imwH7UY-BgBh0Yhgu8NUZXa5Gthb4rm1u2ZIbmPpChaX-Ce3QuHcg-Z-Z",
      mAuthToken:
        "uPCQvKl9RhX5r9SGP2noD0Ei0D3egOAN8IrKQ9lIY-BS0nZ8NKqZIMOel3oNkoUYqtPCSKhwebLrgjfpX-CQWJIcZYXmpdLdIF3rNSY-BJe8dSyjtMBhBHk20pqzLLrwWAX-Cq4yzX-ChX-Csk9vBdT1EflbSDPNZFGgxBc5VnC14kzL8imwH7UY-BgBh0Yhgu8NUZXa5Gthb4rm1u2ZIbmPpChaX-Ce3QuHcg-Z-Z",
      fromw: 1401,
    }).then((ok) => {
      this.list = ok.data;
      console.log(this.list);
    });
    // 附近餐厅
    getFiltercontent({
      cityId: 19,
      mwAuthToken:
        "uPCQvKl9RhX5r9SGP2noD0Ei0D3egOAN8IrKQ9lIY-BS0nZ8NKqZIMOel3oNkoUYqtPCSKhwebLrgjfpX-CQWJIcZYXmpdLdIF3rNSY-BJe8dSyjtMBhBHk20pqzLLrwWAX-Cq4yzX-ChX-Csk9vBdT1EflbSDPNZFGgxBc5VnC14kzL8imwH7UY-BgBh0Yhgu8NUZXa5Gthb4rm1u2ZIbmPpChaX-Ce3QuHcg-Z-Z",
      fromw: 1401,
    }).then((ok) => {
      console.log(ok);
    });
  },
  methods: {},
  components: {
    NearbyRetaurnt,
  },
};
</script>

<style scoped lang="scss">
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.conttent {
  width: 100%;
  height: 100%;
}
header {
  width: 100%;
  background: linear-gradient(red, white);
  .header-top {
    display: flex;
    padding-top: 60rpx;
    height: 70rpx;
    line-height: 70rpx;
    .newspan {
      color: white;
    }
  }
  .uni-padding-wrap {
    width: 90%;
    border-radius: 30rpx;
    margin: 0 auto;
    margin-top: 30rpx;
    overflow: hidden;
    img {
      width: 100%;
      border-radius: 30rpx;
    }
  }
}


</style>
